package 设计模式.观察者模式;

import java.util.Observable;

public class Course extends Observable {

    private String courseName;

    public Course(String courseName) {
        this.courseName = courseName;
    }

    public String getCourseName() {
        return courseName;
    }

    public void produceQuestion(Course course,Question question){
        System.out.println(question.getUserName()+"在"+course.getCourseName()+"上提出问题："+question.getQuestionContent());
        setChanged();
        notifyObservers(question);

    }
}
